package Jogo;

import java.awt.GridBagLayout;
import javax.swing.JPanel;
import java.awt.Dimension;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.JTextField;
import java.awt.Color;

public class ControlPanel extends JPanel {

	private static final long serialVersionUID = 1L;
	private JLabel labelTurn = null;
	private JTextField textTurn = null;
	
	private ControlGame control;
	/**
	 * This is the default constructor
	 */
	public ControlPanel() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		control = new ControlGame();
		
		
		labelTurn = new JLabel();
		labelTurn.setBounds(new Rectangle(29, 30, 38, 16));
		labelTurn.setText("Turn:");
		this.setSize(540, 143);
		this.setLayout(null);
		this.add(labelTurn, null);
		this.add(getTextTurn(), null);
		this.setBackground(new Color(67, 120, 79));
	}

	/**
	 * This method initializes textTurn	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getTextTurn() {
		if (textTurn == null) {
			textTurn = new JTextField();
			textTurn.setBounds(new Rectangle(62, 28, 47, 20));
			textTurn.setText("Team " + control.getTurn());
		}
		return textTurn;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
